# 
# Created by francklinson on 2021/7/29 AT 23:32.
#


class Solution:
    def replaceSpace(self, s: str) -> str:
        return s.replace(" ", "%20")
    # 也可以用一个长数组遍历和重建


if __name__ == '__main__':
    sol = Solution()
    print(sol.replaceSpace(s="We are happy."))
